<?php
/**
 * CreateTime: 2023/11/27 10:33
 * User:LinQ
 */

namespace App\Func\Company;

use App\Func\User\UserFunc;

class CompanyFunc
{
    /**
     * 一般用于顾客端-根据域名和配置文件获取公司id
     * @return mixed
     */
    public function getCustomerComId(): mixed
    {
        $host = request()->getHost();
        $domainConfig = config('domain_mapping');
        if(isset($domainConfig[$host])){
           return $domainConfig[$host]['com_id'];
        }
        return  $domainConfig['default']['com_id'];
    }
}